package com.nav.backend.pojo;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

/**
 * User 实体类，表示用户的数据模型
 */
@Setter
@Getter
@Entity
@Table(name = "user", uniqueConstraints = {@UniqueConstraint(columnNames = "account")})
public class User {

    /**
     * 用户账号，作为主键
     */
    @Id
    @Column(name = "account", nullable = false, unique = true, length = 255)
    private String account;

    /**
     * 用户密码
     */
    @Column(name = "password", nullable = false, length = 255)
    private String password;

    /**
     * 用户手机号
     */
    @Column(name = "phone", length = 11)
    private String phone;

    /**
     * 用户邮箱
     */
    @Column(name = "email", length = 255)
    private String email;
}
